]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
minor js cleanups
authorDan Winship <danw@gnome.org>
Wed, 19 May 2010 17:26:41 +0000 (13:26 -0400)
committerDan Winship <danw@gnome.org>
Wed, 19 May 2010 17:26:41 +0000 (13:26 -0400)
add missing semicolons pointed out by js2-mode, add missing emacs
modelines, fix a few tabs that crept in via cut+paste

js/misc/docInfo.js
js/misc/telepathy.js
js/prefs/clockPreferences.js
js/ui/Makefile.am
js/ui/boxpointer.js
js/ui/dnd.js
js/ui/lookingGlass.js
js/ui/magnifier.js
js/ui/magnifierDBus.js
js/ui/panel.js
js/ui/workspacesView.js

index 205e619d78bb25040b9143c00126f7f1d3c9d886..6e25976a7ef4c1d5746ff360cf226a83495dfbce 100644 (file)
@@ -148,6 +148,6 @@ DocManager.prototype = {
         }
         return multipleMatches.concat(prefixMatches.concat(substringMatches));
     }
-}
+};
 
 Signals.addSignalMethods(DocManager.prototype);
index c33eb728562af9204ffa79a7191e856c40a0e1ad..e4d1a7aee2b1ddbd3d0bc0d23a20302e5ec72df1 100644 (file)
@@ -22,7 +22,7 @@ function nameToPath(name) {
 
 function pathToName(path) {
     if (path[0] != '/')
-       throw new Error('not a D-Bus path: ' + path);
+        throw new Error('not a D-Bus path: ' + path);
     return path.substr(1).replace('/', '.', 'g');
 };
 
index 44bffea70e3f83edb10e395e6ee43e85391b0c1e..757eb7cf1f3fd9afedec116a2293c80be2d29465 100644 (file)
@@ -1,3 +1,5 @@
+/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */
+
 const GLib = imports.gi.GLib;
 const Gtk = imports.gi.Gtk;
 const GConf = imports.gi.GConf;
index e46bc97931ad6fb712b213fbccdb6945bc32e58b..57fb7f4431ff604c373bb18a3552c55fa083dc30 100644 (file)
@@ -4,34 +4,34 @@ dist_jsui_DATA =              \
        altTab.js               \
        appDisplay.js           \
        appFavorites.js         \
-       boxpointer.js   \
+       boxpointer.js           \
        calendar.js             \
        chrome.js               \
        dash.js                 \
        dnd.js                  \
        docDisplay.js           \
        environment.js          \
-       extensionSystem.js  \
+       extensionSystem.js      \
        genericDisplay.js       \
        lightbox.js             \
        link.js                 \
        lookingGlass.js         \
-       main.js                 \
        magnifier.js            \
        magnifierDBus.js        \
+       main.js                 \
        messageTray.js          \
        notificationDaemon.js   \
        overview.js             \
        panel.js                \
        placeDisplay.js         \
        runDialog.js            \
-       search.js           \
+       search.js               \
        shellDBus.js            \
        statusMenu.js           \
        telepathyClient.js      \
        tweener.js              \
-       windowAttentionHandler.js      \
+       windowAttentionHandler.js \
        windowManager.js        \
        workspacesView.js       \
-       workspaceSwitcherPopup.js       \
+       workspaceSwitcherPopup.js \
        workspace.js
index f52713566b9b43bab6af34654501c26fe7d370aa..c85d118da6bb15e9ec1d7fd2f6a89a1a2cf72503 100644 (file)
@@ -1,7 +1,8 @@
-const Lang = imports.lang;
+/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */
 
 const Cairo = imports.cairo;
 const Clutter = imports.gi.Clutter;
+const Lang = imports.lang;
 const St = imports.gi.St;
 const Shell = imports.gi.Shell;
 
@@ -77,7 +78,7 @@ BoxPointer.prototype = {
         let availWidth = box.x2 - box.x1;
         let availHeight = box.y2 - box.y1;
 
-        childBox.x1 = 0
+        childBox.x1 = 0;
         childBox.y1 = 0;
         childBox.x2 = availWidth;
         childBox.y2 = availHeight;
@@ -160,4 +161,4 @@ BoxPointer.prototype = {
             this._border.queue_repaint();
         }
     }
-}
+};
index aa0d19e1b1d6f66bc02f5f82ea75a7276e9b9365..adcf6ec632d540808ed43fdc2152079147b11a6d 100644 (file)
@@ -1,4 +1,4 @@
-/* -*- mode: js2; js2-basic-offset: 4; tab-width: 4; indent-tabs-mode: nil -*- */
+/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */
 
 const Clutter = imports.gi.Clutter;
 const Gtk = imports.gi.Gtk;
index 87c73fa559a5addc1e63c1beae3c63ed35a26779..e75151aeca956cd4f24177ab69bf938147807eb3 100644 (file)
@@ -173,7 +173,7 @@ ObjLink.prototype = {
     _onClicked: function (link) {
         Main.lookingGlass.inspectObject(this._obj, this.actor);
     }
-}
+};
 
 function Result(command, o, index) {
     this._init(command, o, index);
index 99513b136f81d330d4e9a43702382c1224824e39..d9643a292fd2c492ac38e8c29b874849ba1e0218 100644 (file)
@@ -588,7 +588,7 @@ Magnifier.prototype = {
         let gConf = Shell.GConf.get_default();
         this.setCrosshairsClip(gConf.get_boolean(CROSS_HAIRS_CLIP_KEY));
     }
-}
+};
 
 function ZoomRegion(magnifier, mouseRoot) {
     this._init(magnifier, mouseRoot);
@@ -1200,7 +1200,7 @@ ZoomRegion.prototype = {
             this._crosshairsActor.set_position(x - groupWidth / 2, y - groupHeight / 2);
         }
     }
-}
+};
 
 function Crosshairs() {
     this._init();
@@ -1476,4 +1476,4 @@ Crosshairs.prototype = {
         this._vertTopHair.set_position((groupWidth - thickness) / 2, top);
         this._vertBottomHair.set_position((groupWidth - thickness) / 2, bottom);
     }
- }
+};
index b4b59151c75bc906e715959fa531aee704657b4d..feddc288b181615c3ee4d6ecd81db437ef99389d 100644 (file)
@@ -280,7 +280,7 @@ ShellMagnifier.prototype = {
         // Drop the leading '#'.
         return parseInt(colorString.slice(1), 16);
      }
-}
+};
 
 /**
  * ShellMagnifierZoomRegion:
@@ -369,7 +369,7 @@ ShellMagnifierZoomRegion.prototype = {
         let viewRect = { x: viewPort[0], y: viewPort[1], width: viewPort[2], height: viewPort[3] };
         this._zoomRegion.setViewPort(viewRect);
     }
-}
+};
 
 DBus.conformExport(ShellMagnifier.prototype, MagnifierIface);
 DBus.conformExport(ShellMagnifierZoomRegion.prototype, ZoomRegionIface);
index 75cb755e5b15a6d87bd0cf84b304e0ff094b150d..acf41e3a9f4f488ef07703555307a916f440a021 100644 (file)
@@ -184,7 +184,7 @@ PanelMenuItem.prototype = {
 
         this.label = new St.Label({ text: text });
         this.actor.set_child(this.label);
-    },
+    }
 };
 
 function PanelSeparatorMenuItem() {
@@ -209,9 +209,9 @@ PanelSeparatorMenuItem.prototype = {
         let found, margin, gradientHeight;
         [found, margin] = themeNode.get_length('-margin-horizontal', false);
         [found, gradientHeight] = themeNode.get_length('-gradient-height', false);
-        let startColor = new Clutter.Color()
+        let startColor = new Clutter.Color();
         themeNode.get_color('-gradient-start', false, startColor);
-        let endColor = new Clutter.Color()
+        let endColor = new Clutter.Color();
         themeNode.get_color('-gradient-end', false, endColor);
 
         let gradientWidth = (width - margin * 2);
@@ -1112,12 +1112,12 @@ Panel.prototype = {
                 break;
             case '24-hour':
                 if (showDate)
-                   /* Translators: This is the time format with date used
+                    /* Translators: This is the time format with date used
                        in 24-hour mode. */
                     clockFormat = showSeconds ? _("%a %b %e, %R:%S")
                                               : _("%a %b %e, %R");
                 else
-                   /* Translators: This is the time format without date used
+                    /* Translators: This is the time format without date used
                        in 24-hour mode. */
                     clockFormat = showSeconds ? _("%a %R:%S")
                                               : _("%a %R");
@@ -1125,12 +1125,12 @@ Panel.prototype = {
             case '12-hour':
             default:
                 if (showDate)
-                   /* Translators: This is a time format with date used
+                    /* Translators: This is a time format with date used
                        for AM/PM. */
                     clockFormat = showSeconds ? _("%a %b %e, %l:%M:%S %p")
                                               : _("%a %b %e, %l:%M %p");
                 else
-                   /* Translators: This is a time format without date used
+                    /* Translators: This is a time format without date used
                        for AM/PM. */
                     clockFormat = showSeconds ? _("%a %l:%M:%S %p")
                                               : _("%a %l:%M %p");
index c849c5f52c47ff33973c4d323178ed7f1e3069eb..bb585667f12a45d7d5eb26d8b3378d774ab36428 100644 (file)
@@ -633,11 +633,11 @@ SingleView.prototype = {
         this._leftShadow = new St.Bin({ style_class: 'left-workspaces-shadow',
                                         width: Math.ceil(global.screen_width * WORKSPACE_SHADOW_SCALE),
                                         height: global.screen_height,
-                                        x: global.screen_width })
+                                        x: global.screen_width });
         this._rightShadow = new St.Bin({ style_class: 'right-workspaces-shadow',
                                          width: Math.ceil(global.screen_width * WORKSPACE_SHADOW_SCALE),
                                          height: global.screen_height,
-                                         x: global.screen_width })
+                                         x: global.screen_width });
 
         GenericWorkspacesView.prototype._init.call(this, width, height, x, y, workspaces);
 
@@ -1071,7 +1071,7 @@ SingleView.prototype = {
     },
 
     updateWorkspaces: function(oldNumWorkspaces, newNumWorkspaces, lostWorkspaces) {
-       let active = global.screen.get_active_workspace_index();
+        let active = global.screen.get_active_workspace_index();
 
         for (let l = 0; l < lostWorkspaces.length; l++)
             lostWorkspaces[l].disconnectAll();
@@ -1545,7 +1545,7 @@ WorkspacesControls.prototype = {
     },
 
     _workspacesChanged: function() {
-        let showToggleButton = (global.screen.n_workspaces > 1)
+        let showToggleButton = (global.screen.n_workspaces > 1);
         Tweener.addTween(this._toggleViewButton,
                          { opacity: showToggleButton ? 255 : 0,
                            time: WORKSPACE_SWITCH_TIME,